package cn.sumpu.app.wlcity.dao;

import java.util.List;
import java.util.Map;

import cn.sumpu.app.wlcity.domain.Vote;
import cn.sumpu.app.wlcity.domain.VoteItem;
import cn.sumpu.app.wlcity.domain.VoteItemPhone;
import cn.sumpu.app.wlcity.exception.AppBusinessException;

public interface VoteDao {
	public void insertVote(Vote vote) throws AppBusinessException;

	public void insertVoteItem(VoteItem voteItem) throws AppBusinessException;

	public void insertVoteItemPhone(VoteItemPhone voteItemPhone)
			throws AppBusinessException;

	public void deleteVote(String identifier) throws AppBusinessException;
	
	public void deleteVoteItem(String identifier) throws AppBusinessException;
	
	public void deleteVoteItemPhone(String voteItemId) throws AppBusinessException;
	
	public void deleteVoteItemList(String identifier) throws AppBusinessException;

	public List<Vote> getVoteAndVoteItemList(Map<String, Object> map) throws AppBusinessException;
	
	public List<Vote> getVoteList(Map<String, Object> map) throws AppBusinessException;
	
	public List<VoteItem> getVoteItemList(Map<String, Object> map) throws AppBusinessException;
	
	public int getVoteItemListCount(Map<String, Object> map) throws AppBusinessException;
	
	public int getVoteListCount(String app) throws AppBusinessException;

	public void updateVote(Vote vote) throws AppBusinessException;
	
	public void upEachVoteSort(String app) throws AppBusinessException;
	
	public void downEachVoteSort(Map<String, Object> map) throws AppBusinessException;
	
	public void moveVoteSort(Map<String, Object> map) throws AppBusinessException;
	
	public void updateVoteItem(VoteItem voteItem) throws AppBusinessException;
	
	public Vote getVoteById(String id) throws AppBusinessException;
	
	public VoteItem getVoteItemById(String id) throws AppBusinessException;
	
	public VoteItemPhone checkVotePhone(Map<String, Object> map) throws AppBusinessException;
	
	public List<VoteItemPhone> getVotePhone(Map<String, Object> map)throws AppBusinessException;
	
	public int getVotePhoneCount(Map<String, Object> map)throws AppBusinessException;
	
	public List<Vote> getVote(Map<String, Object> map) throws AppBusinessException;
	
	public int getVoteCount(Map<String, Object> map) throws AppBusinessException;
	
	public List<VoteItem> getVoteItem(Map<String, Object> map) throws AppBusinessException;
	
	public int getVoteItemCount(Map<String, Object> map) throws AppBusinessException;
}
